package org.feiye.studyday12;

public class JavaClass {
	public String name;
	public String dirTeacher, teacherTeacher;
	public String beginDate;
	// 学员信息
	String[] mates = new String[30];

	public void add(String newStu) {
		for (int i = 0; i < mates.length; i++) {
			if (mates[i] == null) {
				mates[i] = newStu;
				return;
			}
		}
		System.out.println("位置已满！");
	}

	public boolean search1(String sname, int start, int end) {
		for (int i = start; i <= end && i < mates.length; i++) {
			if (mates[i] != null && mates[i].equals(sname)) {
				return true;
			}
		}
		return false;
	}
}
